<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="cfn" uri="http://com.abou/cfn"%>
<%@page import="com.abou.constant.product.*"%>
<%@page import="com.abou.mvc.controller.admin.HomeController"%>
<%@ include file="../../constants.jsp"%>
<%@ include file="../vars.jsp"%>

<%-- Creates a product div. Parameters are :
    - name : the product name
    - price : the product price
    - description : the product description
    - colors : the product colors
    - makeup : the product makeup
--%>

<%-- The product price/name resume --%>
<div class="product-resume">
	<span class="content">
		${param.name}
	</span>
	<div class="breaker"></div>
	<span class="price-big">
		${param.price} &euro;
	</span>
</div>

<div id="product-details">

	<span class="title">${param.name}</span>

	<div class="product-details">
		<div class="detail">
			<div class="title">
				<spring:theme code="customer.product.detail.description"/>
			</div>
			<div class="content">
				${param.description}
			</div>
		</div>
	</div>

	<c:if test="${not empty requestScope[param.colors]}">
		<div class="product-details">
			<div class="detail">
				<div class="title">
					<spring:theme code="customer.product.detail.color"/>
				</div>
				<div class="row content">
					<ul class="color">
						  <c:forEach items="${requestScope[param.colors]}"
						   var="color" varStatus="stat">
						    <li>
						    	<span class="lgd"
						    	 style="background-color:${color.colorCodeHtml};">&nbsp;</span>
						    	 &nbsp; ${cfn:formatExt(pageContext, color, true)}
						    </li>
						  </c:forEach>
					</ul>
				</div>
			</div>
		</div>
	</c:if>

	<c:if test="${not empty param.makeup}">
		<div class="product-details">
			<div class="detail">
				<div class="title">
					<spring:theme code="customer.product.detail.makeup"/>
				</div>
				<div class="content">
					${param.makeup}
				</div>
			</div>
		</div>
	</c:if>
</div>